#include <iostream>

#include "Book.h"

using namespace std;

void ProcessBook( Book *pBook )
{
	Book *pTempBook;
	if ( pTempBook = pBook  ) // Assigning pBook to pTempBook. pTempBook then returns and gets validated.
		cout << "Processing book!";
	else
		cout << "Error! pBook pointer is NULL! Not a valid book!";
}


int main( void )
{
	//Book basd;
	Book book1( "book1" ), book2( "book2" );
	Book book3( book1 );

	book1 = book1;
	book1 = book2;

	bool b;
	Book *pBook = NULL;

	ProcessBook( &book1 );

	int *pNewNum = new int;

	// use pNewNum

	// we're done using pNewNum. So delete!
	delete pNewNum;
	pNewNum = NULL; // ALWAYS ALWAYS ALWAYS MAKE SURE to set the pointer to NULL AFTER USE!
	delete pNewNum; // Apparently, deleting a null pointer doesn't crash the program.
}